package com.ywgt.service.impl;

import com.github.pagehelper.Page;
import com.github.pagehelper.PageHelper;
import com.ywgt.pojo.Region;
import com.ywgt.mapper.RegionMapper;
import com.ywgt.service.RegionService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;

/**
 * <p>
 * 行政区域表 服务实现类
 * </p>
 *
 * @author yiping
 * @since 2021-03-13
 */
@Service
public class RegionServiceImpl extends ServiceImpl<RegionMapper, Region> implements RegionService {

    @Override
    public Page<Region> getRegions(String name, Integer code, int page, int limit) {
        PageHelper.startPage(page,limit);
        return baseMapper.selectRegions(name,code);
    }
}
